package com.yps.controller;

import com.yps.mapper.SparkManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/chat")
public class XunFeiXingHuoChat {

    @Autowired
    private SparkManager sparkManager;

    /**
     * 聊天
     *
     * @param content
     * @return
     */
    @GetMapping("/respone")
    public String respone(String content) {
        log.info("用户提问:{}", content);
        return sparkManager.sendMesToAIUseXingHuo(content);
    }
}
